package com.yunke.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 分销佣金记录实体类
 * 
 * @author yunke
 * @since 1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("yunke_distributor_commission")
@Schema(name = "YunkeDistributorCommission", description = "分销佣金记录实体")
public class YunkeDistributorCommission implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "佣金记录ID")
    private Long id;

    @Schema(description = "分销商ID")
    private Long distributorId;

    @Schema(description = "分销商用户ID")
    private Long distributorUserId;

    @Schema(description = "订单ID")
    private Long orderId;

    @Schema(description = "订单号")
    private String orderNo;

    @Schema(description = "客户用户ID")
    private Long customerUserId;

    @Schema(description = "客户昵称")
    private String customerNickname;

    @Schema(description = "佣金类型（1注册佣金 2充值佣金 3VIP购买佣金 4服务订单佣金 5搭子佣金）")
    private Integer commissionType;

    @Schema(description = "佣金等级（1一级佣金 2二级佣金 3三级佣金）")
    private Integer commissionLevel;

    @Schema(description = "订单金额")
    private BigDecimal orderAmount;

    @Schema(description = "佣金比例（百分比）")
    private BigDecimal commissionRate;

    @Schema(description = "佣金金额")
    private BigDecimal commissionAmount;

    @Schema(description = "实际佣金金额（扣除税费等）")
    private BigDecimal actualAmount;

    @Schema(description = "佣金状态（0待结算 1已结算 2已冻结 3已取消）")
    private Integer commissionStatus;

    @Schema(description = "结算时间")
    private Long settleTime;

    @Schema(description = "结算批次号")
    private String settleBatchNo;

    @Schema(description = "冻结原因")
    private String freezeReason;

    @Schema(description = "冻结时间")
    private Long freezeTime;

    @Schema(description = "取消原因")
    private String cancelReason;

    @Schema(description = "取消时间")
    private Long cancelTime;

    @Schema(description = "业务相关数据（JSON格式）")
    private String businessData;

    @Schema(description = "备注信息")
    private String remark;

    @Schema(description = "状态（0正常 1删除）")
    private Integer status;

    @Schema(description = "创建时间")
    private Long createTime;

    @Schema(description = "更新时间")
    private Long updateTime;
} 